import service from '@/utils/request'

// @Tags SbuProjects
// @Summary 创建项目资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SbuProjects true "创建项目资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /sbuProjects/createSbuProjects [post]
export const createSbuProjects = (data) => {
  return service({
    url: '/sbuProjects/createSbuProjects',
    method: 'post',
    data
  })
}

// @Tags SbuProjects
// @Summary 删除项目资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SbuProjects true "删除项目资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sbuProjects/deleteSbuProjects [delete]
export const deleteSbuProjects = (params) => {
  return service({
    url: '/sbuProjects/deleteSbuProjects',
    method: 'delete',
    params
  })
}

// @Tags SbuProjects
// @Summary 批量删除项目资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除项目资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sbuProjects/deleteSbuProjects [delete]
export const deleteSbuProjectsByIds = (params) => {
  return service({
    url: '/sbuProjects/deleteSbuProjectsByIds',
    method: 'delete',
    params
  })
}

// @Tags SbuProjects
// @Summary 更新项目资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SbuProjects true "更新项目资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /sbuProjects/updateSbuProjects [put]
export const updateSbuProjects = (data) => {
  return service({
    url: '/sbuProjects/updateSbuProjects',
    method: 'put',
    data
  })
}

// @Tags SbuProjects
// @Summary 用id查询项目资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.SbuProjects true "用id查询项目资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sbuProjects/findSbuProjects [get]
export const findSbuProjects = (params) => {
  return service({
    url: '/sbuProjects/findSbuProjects',
    method: 'get',
    params
  })
}

// @Tags SbuProjects
// @Summary 分页获取项目资讯列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取项目资讯列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sbuProjects/getSbuProjectsList [get]
export const getSbuProjectsList = (params) => {
  return service({
    url: '/sbuProjects/getSbuProjectsList',
    method: 'get',
    params
  })
}

// 相关
export const getAssociationList = (params) => {
  return service({
    url: '/productSpec/getAssociationList',
    method: 'get',
    params
  })
}

/**
 * 创建款式数量
 */
 export const createSbuProjectsNum = (data) => {
  return service({
    url: '/sbuProjects/createSbuProjectsNum',
    method: 'post',
    donNotShowLoading: true,
    data
  })
}